//
//  DetailSpecialTableViewCell.m
//  小胖兔旅行指南
//
//  Created by 小胖兔 on 15/4/20.
//  Copyright (c) 2015年 小胖兔. All rights reserved.
//

#import "DetailSpecialTableViewCell.h"

@implementation DetailSpecialTableViewCell

-(void)dealloc
{
    [_aImage release];
    [_bImage release];
    [_cImage release];
    
    [_aLable release];
    [_bLable release];
    [_cLable release];
    
    [_aButton release];
    [_bButton release];
    [_cButton release];
    
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIView *cellView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 200)] autorelease];
        [self.contentView addSubview:cellView];
        
        self.aImage = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 5, cellView.frame.size.width / 2 - 2.5, cellView.frame.size.height - 5)] autorelease];
        self.aButton = [[[UIButton alloc] initWithFrame:CGRectMake(0, 0, _aImage.frame.size.width, _aImage.frame.size.height)] autorelease];
        self.aLable = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, _aImage.frame.size.width, _aImage.frame.size.height)] autorelease];
        [cellView addSubview:_aImage];
        [_aImage addSubview:_aLable];
        [_aLable addSubview:_aButton];
        _aImage.userInteractionEnabled = YES;
        _aLable.userInteractionEnabled = YES;
        [_aLable setTextAlignment:NSTextAlignmentCenter];
        [_aLable setTextColor:[UIColor whiteColor]];
        [_aLable setFont:[UIFont systemFontOfSize:20.0]];
        
        
        self.bImage = [[[UIImageView alloc] initWithFrame:CGRectMake(_aImage.frame.size.width + 5, 5, cellView.frame.size.width - (_aImage.frame.size.width + 5), _aImage.frame.size.height / 2 - 2.5)] autorelease];
        self.bButton = [[[UIButton alloc] initWithFrame:CGRectMake(0, 0, _bImage.frame.size.width, _bImage.frame.size.height)] autorelease];
        self.bLable = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, _bImage.frame.size.width, _bImage.frame.size.height)] autorelease];
        [cellView addSubview:_bImage];
        [_bImage addSubview:_bLable];
        [_bLable addSubview:_bButton];
        _bImage.userInteractionEnabled = YES;
        _bLable.userInteractionEnabled = YES;
        [_bLable setTextAlignment:NSTextAlignmentCenter];
        [_bLable setTextColor:[UIColor whiteColor]];
        [_bLable setFont:[UIFont systemFontOfSize:20.0]];
        
        
        self.cImage = [[[UIImageView alloc] initWithFrame:CGRectMake(_aImage.frame.size.width + 5, _bImage.frame.size.height + 10, _bImage.frame.size.width, _bImage.frame.size.height)] autorelease];
        self.cButton = [[[UIButton alloc] initWithFrame:CGRectMake(0, 0, _cImage.frame.size.width, _cImage.frame.size.height)] autorelease];
        self.cLable = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, _cImage.frame.size.width, _cImage.frame.size.height)] autorelease];
        [cellView addSubview:_cImage];
        [_cImage addSubview:_cLable];
        [_cLable addSubview:_cButton];
        _cImage.userInteractionEnabled = YES;
        _cLable.userInteractionEnabled = YES;
        [_cLable setTextAlignment:NSTextAlignmentCenter];
        [_cLable setTextColor:[UIColor whiteColor]];
        [_cLable setFont:[UIFont systemFontOfSize:20.0]];
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}


@end
